package com.pig4cloud.pig.demo.timer;

import com.pig4cloud.pig.demo.mapper.XlmOrderMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class TaskUtils {

    @Autowired
    XlmOrderMapper xlmOrderMapper;

    @Scheduled(cron = "0 0/1 * * * ?") // cron 表达式，每分钟执行一次
    public void doTask() {
        xlmOrderMapper.timeoutTask();
    }
}
